package com.pubinfo.passbook.common.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pubinfo.passbook.common.handler.writeoff.TbWriteoffUserListTypeHandler;
import com.pubinfo.passbook.common.model.bo.witeoff.WriteoffBaseDataOrg;
import com.pubinfo.passbook.common.model.http.response.GetWriteoffBaseData.WriteoffBaseDataItem;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.util.List;

/**
 * @TableName t_writeoff_data_user
 */
@TableName(value = "t_writeoff_data_user")
@Data
public class TWriteoffDataUser implements Serializable {
  /**
   *
   */
  private String principalAccount;
  
  /**
   *
   */
  private String principalName;
  
  /**
   *
   */
  @TableId
  private String tel;
  
  /**
   *
   */
  
  @TableField(typeHandler = TbWriteoffUserListTypeHandler.class)
  private List<WriteoffBaseDataOrg> writeoffBaseDataOrgAndRoles;
  /**
   *
   */
  private String errorMsg;
  
  @TableField(exist = false)
  private static final long serialVersionUID = 1L;
  
  public TWriteoffDataUser(WriteoffBaseDataItem item) {
    BeanUtils.copyProperties(item, this);
  }
}